iT邦幫忙

2024 iThome 鐵人賽

DAY 25
0
生成式 AI

智能雲端架構圖生成:結合LangChain&LangGrpah與Rag的創新應用系列 第 25

day25 結合AWS Kendra與RAG的詳細操作:解鎖雲端資料的智慧搜索能力

  • 分享至 

  • xImage
  •  

前言

昨天我們進行AgentBuilder的文件上傳與搜尋測試,那麼今天我們進行AWS Kendra的詳細操作和上傳文件過程解析

正文

S3啟用

參考資料:https://docs.aws.amazon.com/kendra/latest/dg/getting-started-s3.html
首先先建立S3,我這邊都用預設,也能根據自己的需求去修改
https://ithelp.ithome.com.tw/upload/images/20240924/20168697a6BQuG9etv.png
並且在S3中放入之前的教科書文件
https://ithelp.ithome.com.tw/upload/images/20240924/20168697kroelHgwEE.png

AWS Kendra

參考資料:https://docs.aws.amazon.com/kendra/latest/dg/gs-console.html
在kendra當中按下create index
https://ithelp.ithome.com.tw/upload/images/20240924/2016869704DgfjqUUR.png
https://ithelp.ithome.com.tw/upload/images/20240924/20168697bGMCzFNoKq.png
iam的部分直接create一個new role
https://ithelp.ithome.com.tw/upload/images/20240924/20168697unltFr9MWV.png
剩下的若沒有特殊需求,即可創建Kendra
創建的過程大約要等待30分鐘,直到狀態寫active
https://ithelp.ithome.com.tw/upload/images/20240924/20168697Chps2vtfL9.png

add dataSource

點進來後,可以看到index id ,這邊就是串接Kendra的關鍵參數
https://ithelp.ithome.com.tw/upload/images/20240924/20168697SnKspkhojk.png
在旁邊的導覽列先選擇新增dataSource
https://ithelp.ithome.com.tw/upload/images/20240924/20168697SQBTifNk7d.png
輸入dataSource的名稱後即可新增
https://ithelp.ithome.com.tw/upload/images/20240924/20168697gkRLEtjknT.png
當然創建也需要時間,因此直到active為止
https://ithelp.ithome.com.tw/upload/images/20240924/20168697YQbSy1heTO.png

同步S3

點進去後可以選擇同步歷史紀錄Sync history,就可以選擇對應的S3來進行同步了!
https://ithelp.ithome.com.tw/upload/images/20240924/201686975BcM6mzaaJ.png
等待同步成功
https://ithelp.ithome.com.tw/upload/images/20240924/2016869760LUBFKmIb.png

下一天

明天我們會串接LangChain,並且先在IAM 獲取權限後 再使用awscli 進行本地的credentials 輸入access key  才能串接Kendra
一般而言,在雲端環境下部屬,會有IAM或是服務帳戶,就能直接給予權限,但在本地端需要用access key

上一篇
day24 探索 GCP Agent Builder Search:實現文件上傳與搜尋測試的智能搜尋體驗
下一篇
day26 AWS Kendra 智慧高效雲端搜尋:LangChain 驅動的雲端架構生成應用
系列文
智能雲端架構圖生成:結合LangChain&LangGrpah與Rag的創新應用27
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言